package com.ruoyi.system.service.impl;

import java.util.List;

import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.PensionServicesMapper;
import com.ruoyi.system.domain.PensionServices;
import com.ruoyi.system.service.IPensionServicesService;

/**
 * 服务申请Service业务层处理
 * 
 * @author ruoyi
 * @date 2021-07-09
 */
@Service
public class PensionServicesServiceImpl implements IPensionServicesService 
{
    @Autowired
    private PensionServicesMapper pensionServicesMapper;

    /**
     * 查询服务申请
     * 
     * @param pId 服务申请ID
     * @return 服务申请
     */
    @Override
    public PensionServices selectPensionServicesById(Long pId)
    {
        return pensionServicesMapper.selectPensionServicesById(pId);
    }

    /**
     * 查询服务申请列表
     * 
     * @param pensionServices 服务申请
     * @return 服务申请
     */
    @Override
    public List<PensionServices> selectPensionServicesList(PensionServices pensionServices)
    {
        return pensionServicesMapper.selectPensionServicesList(pensionServices);
    }

    /**
     * 新增服务申请
     * 
     * @param pensionServices 服务申请
     * @return 结果
     */
    @Override
    public int insertPensionServices(PensionServices pensionServices)
    {pensionServices.setpCreateTime(DateUtils.getNowDate());
        return pensionServicesMapper.insertPensionServices(pensionServices);
    }

    /**
     * 修改服务申请
     * 
     * @param pensionServices 服务申请
     * @return 结果
     */
    @Override
    public int updatePensionServices(PensionServices pensionServices)
    {   pensionServices.setpUpdateTime(DateUtils.getNowDate());
        return pensionServicesMapper.updatePensionServices(pensionServices);
    }

    /**
     * 批量删除服务申请
     * 
     * @param pIds 需要删除的服务申请ID
     * @return 结果
     */
    @Override
    public int deletePensionServicesByIds(Long[] pIds)
    {
        return pensionServicesMapper.deletePensionServicesByIds(pIds);
    }

    /**
     * 删除服务申请信息
     * 
     * @param pId 服务申请ID
     * @return 结果
     */
    @Override
    public int deletePensionServicesById(Long pId)
    {
        return pensionServicesMapper.deletePensionServicesById(pId);
    }
}
